# -*- coding: utf-8 -*-
# @Time : 2025/2/28 10:16
# @Author : debbyszhang
# @File : get_token.py
# @desc :
import allure

from pageObject.relay_list_page import RelayListPage


@allure.feature("获取token")
class TestGetToken:

    def test_get_token(self, page):
        relay_page = RelayListPage(page)
        relay_page.get_token()
        def handle_dialog(dialog):
            print(f"Dialog message: {dialog.message}")  # 打印弹窗内容
            dialog.accept()  # 接受弹窗

        page.on("dialog", handle_dialog)
        page.on('dialog', lambda dialog: print(dialog.message))
